#include <cstdio>
#include <cstring>

using namespace std;

char str[85][85] = {0};

int main()
{
    int n = 0;
    while(1){
        scanf("%s", str[n++]);
        if(getchar() == '\n'){ break; }
    }
    while(n--){ printf("%s%s", str[n], 0==n?"":" "); }
    printf("\n");
    return 0;
}
